<oc-dialog style="height:600px;width:900px"
	oc-dialog-title="*新字典 - 数据字典编辑器"
	oc-dialog-icon="dictionary"
	oc-dialog-switch="MS">
	<div ng-controller="DictionaryEditor" class="grid" style="height:100%;width:100%">
		<oc-list-menu content="menu"></oc-list-menu>
		<nav class="oc-toolbar" style="border-bottom:1px solid #aaa;top:1rem">
			<button class="ico new" title="新建" ng-click="newDictionary()"></button>
			<button class="ico open" title="打开" ng-click="openDictionary()"></button>
			<button class="ico save" title="保存" ng-click="saveDictionary()"></button><hr/>
			<button class="ico trash" title="清空字典" oc-alert-open="trashDictionary"></button>
		</nav>
		<div class="grid" style="top:2.5rem;height:auto;bottom:0;background:#f2f2f2"></div>
		<oc-tab-set style="top:2.5rem;bottom:0rem" oc-tab-control="editorControl">
			<oc-tab oc-tab-title="字段">
				<!--编辑字段-->
				<fieldset class="oc-legend" style="left:0;top:0;width:16.4rem;bottom:0">
					<legend>编辑字段</legend>
						<label style="top:.5rem;left:.3rem">字段名：</label>
						<input type="text" ng-model="field.name"
							style="top:1.5rem;left:.3rem;width:15.7rem">
						<label style="top:2.8rem;left:.3rem">模式：</label>
						<input type="text" ng-model="field.pattern"
							style="top:3.8rem;left:.3rem;width:15.7rem">
						<label style="top:5.1rem;left:.3rem">注释：</label>
						<textarea ng-model="field.comment"
							style="top:6.1rem;left:.3rem;width:15.7rem;height:4rem"></textarea>
						<button style="top:10.4rem;left:.3rem;width:4.3rem;height:1.1rem">预设</button>
						<button title="追加到字典列表"
							style="right:.3rem;top:10.4rem;width:1.1rem;height:1.1rem"
							class="addDictionary"
							ng-click="appendNewField()" ng-disabled="field.name==''"></button>
						<oc-list oc-list-data="preinstall" oc-list-control="listCtrl"
							style="top:11.8rem;left:.3rem;bottom:.3rem;right:.3rem;
							border:1px solid #ccc"></oc-list>
				</fieldset>
				<fieldset class="oc-legend" style="top:0;bottom:0;left:16.7rem;right:0">
					<legend>字段列表</legend>
						<button style="left:.3rem;top:.5rem" class="ico search" title="预览"
							oc-dialog-open="preview"
							ng-disabled="!dictionary.field.length"></button>
						<button style="left:1.7rem;top:.5rem" class="ico delete"
							title="删除选中字段" ng-disabled="!dictionary.field.length"
							ng-click="deleteField()"></button>
						<oc-list oc-list-data="dictionary.field" oc-list-control="fieldCtrl"
							style="border:1px solid #ccc;top:1.9rem;bottom:.3rem;
							left:.3rem;right:.3rem"></oc-list>
				</fieldset>
			</oc-tab>
			
			<oc-tab oc-tab-title="特殊值">
				<button style="right:0" class="ico delete"
					title="删除选中特殊值"
					ng-click="deleteAssignment()"></button>
				<oc-grid oc-grid-data="dictionary.assignment"
					oc-grid-control="assignmentCtrl"
					oc-grid-refresh="refresh.grid"
					style="border:1px solid #ACACAC;left:0;right:0;top:1.4rem;bottom:0"></oc-grid>
			</oc-tab>
		</oc-tab-set>
	</div>
</oc-dialog>
